#!/bin/sh
#
# Shamelessly ripped from imlib-config that was 
# apparently shamelessly ripped from gtk's gtk-config.in
#

VERSION="2.0.1"
CCFLAGS=" -D_REENTRANT -fno-exceptions"
LDFLAGS=""
LIBS=" -lpthread -lsasl2 -lssl -lcrypto -lresolv -ldl -lpt"
LIBDIR="${exec_prefix}/lib"
PTINSTDIR="/usr/local/share/ptlib"
MACHTYPE="x86"
OSTYPE="linux"
OSRELEASE=""2.6.29.6-smp""
SHAREDLIBEXT="so"
INSTALLPREFIX="/usr/local"

# usage="Usage: ptlib-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
usage="Usage: ptlib-config [--version] [--ptlibdir] [--ccflags] [--ldflags] [--libs] [--machtype] [--ostype] [--osrelease] [--sharedlibext] [--prefix] [--libdir]"

if test $# -eq 0; then
      echo "${usage}" 1>&2
      exit 1
fi

while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case $1 in
    --version)
      echo $VERSION
      ;;
    --ptlibdir)
      echo $PTINSTDIR
      ;;
    --ldflags)
      echo $LDFLAGS
      ;;
    --ccflags)
      echo $CCFLAGS
      ;;
    --libs)
      echo $LIBS
      ;;
    --machtype)
      echo $MACHTYPE
      ;;
    --ostype)
      echo $OSTYPE
      ;;
    --osrelease)
      echo $OSRELEASE
      ;;
    --sharedlibext)
      echo $SHAREDLIBEXT
      ;;
    --prefix)
      echo $INSTALLPREFIX
      ;;
    --libdir)
      echo $LIBDIR
      ;;
    --all)
      echo VERSION      = $VERSION
      echo PTLIBDIR     = $PTINSTDIR
      echo LDFLAGS      = $LDFLAGS
      echo CCFLAGS      = $CCFLAGS
      echo LIBS         = $LIBS
      echo MACHTYPE     = $MACHTYPE
      echo OSTYPE       = $OSTYPE
      echo OSRELEASE    = $OSRELEASE
      echo SHAREDLIBEXT = $SHAREDLIBEXT
      echo PREFIX       = $INSTALLPREFIX
      echo LIBDIR       = $LIBDIR
      ;;

    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

exit 0
